package com.alvin.mobi.domain;

public enum DepartmentType {
	DISTRIBUTOR(1, "\u603b\u4ee3"),
	PROVINCIAL_AGENT(2, "\u7701\u4ee3"),
	STORE(3, "\u95e8\u5e97");
	
	private int id;
	private String displayName;

	DepartmentType(int id, String displayName) {
		this.id = id;
		this.displayName = displayName;
	}
	
	public String getName() {
		return this.name();
	}
	public int getId() {
		return id;
	}
	public String getDisplayName() {
		return displayName;
	}
	public static DepartmentType valueOf(int id){
		if(id == 1) return DepartmentType.DISTRIBUTOR;
		if(id == 2) return DepartmentType.PROVINCIAL_AGENT;
		if(id == 3) return DepartmentType.STORE;
		return null;
	}
}
